<%-- 
    Document   : viewend
    Created on : 2012-maj-06, 18:28:34
    Author     : Inna Ermilova
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="computershop" uri="/computershop"  %>
<!DOCTYPE html>
<html>
    <head><title>computershop::shop</title></head>
    <body>
        <h2>computershop</h2>
        <jsp: useBean id="computerlist" class="beans.computerlistBean" scope="application">
            Error the bean should be created in the servlet!
        </jsp: useBean>
        
    <c:set var="computerlist_xslt">
        <c:import url="computerlist_xslt.xsl"/>
    </c:set>
    
    <x:transform xslt="${computerlist_xslt}">
        <jsp:getPropertyname="computerlist" property="xml"/> 
    </x:transform>
    
    <c:set var="shoppingcart_xslt">
        <c:import url="shoppingcart_xslt.xsl"/>
    </c:set>
        <x:transform xslt="${shoppingcart_xslt}">
        <computershop:shoppingcart/>
        </x:transform>
        
        <c:if test="${sessionScope.currentUser !=null}">
            <form action=shop?action=profile method=post>
                <input type="submit" value="UpdateProfile">
            </form>
            
            <form action=shop?action=logout method=post>
                <input type="submit" value="Logout">
            </form>
            
        </c:if>
    </body>
</html>
